package core;

public class ProgramFile {

	public static String NONE = "NONE";
	
	int fileId;
	String fileName;
	
	String programName;
	String last_edit_by;
	String last_edit_when;
	
	boolean locked;
	String locked_by;
	
	int release_number;
	
	public ProgramFile(int fileId, String fileName) {
		super();
		this.fileId = fileId;
		this.fileName = fileName;
		
		this.locked = false;
		this.locked_by = ProgramFile.NONE;
	}

	public void lockFile(String userId)
	{
		this.locked = true;
		this.locked_by = userId;
	}

	public void unLockFile()
	{
		this.locked = false;
		this.locked_by = ProgramFile.NONE;
	}
	
	public String getProgramName() {
		return programName;
	}

	public void setProgramName(String programName) {
		this.programName = programName;
	}

	public String getLast_edit_by() {
		return last_edit_by;
	}

	public void setLast_edit_by(String lastEditBy) {
		last_edit_by = lastEditBy;
	}

	public String getLast_edit_when() {
		return last_edit_when;
	}

	public void setLast_edit_when(String lastEditWhen) {
		last_edit_when = lastEditWhen;
	}

	public int getFileId() {
		return fileId;
	}

	public String getFileName() {
		return fileName;
	}

	public int getRelease_number() {
		return release_number;
	}

	public void setRelease_number(int releaseNumber) {
		release_number = releaseNumber;
	}
	
	public String getLocked_by() {
		return locked_by;
	}

}
